home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
SCGetSaveOptions.z
/
SCGetSaveOptions
Wrap
Text File
|
1998-10-30
|
6KB
|
133 lines
SSSSCCCCGGGGEEEETTTTSSSSAAAAVVVVEEEEOOOOPPPPTTTTIIIIOOOONNNNSSSS((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo SSSSCCCCGGGGEEEETTTTSSSSAAAAVVVVEEEEOOOOPPPPTTTTIIIIOOOONNNNSSSS((((3333))))
NNNNAAAAMMMMEEEE
SCGetSaveOptions, SCSetSaveOptions - Getting and setting saved scanner
specific options
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
####iiiinnnncccclllluuuuddddeeee <<<<ssssccccaaaannnnnnnneeeerrrr....hhhh>>>>
iiiinnnntttt SSSSCCCCGGGGeeeettttSSSSaaaavvvveeeeOOOOppppttttiiiioooonnnnssss((((SSSSCCCCAAAANNNNNNNNEEEERRRR ****ssss,,,, vvvvooooiiiidddd ********ooooppppttttiiiioooonnnnssss,,,, iiiinnnntttt ****nnnnBBBByyyytttteeeessss))));;;;
iiiinnnntttt SSSSCCCCSSSSeeeettttSSSSaaaavvvveeeeOOOOppppttttiiiioooonnnnssss((((SSSSCCCCAAAANNNNNNNNEEEERRRR ****ssss,,,, vvvvooooiiiidddd ****ooooppppttttiiiioooonnnnssss,,,, iiiinnnntttt nnnnBBBByyyytttteeeessss))));;;;
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_S_C_G_e_t_S_a_v_e_O_p_t_i_o_n_s and _S_C_S_e_t_S_a_v_e_O_p_t_i_o_n_s exist as a mechanism for scanner
applications to save scanner specific settings for later restoration.
_g_s_c_a_n(1) uses these functions to save scanner specific settings when you
choose "Save Current Settings..." from the "Setup" menu.
_S_C_G_e_t_S_a_v_e_O_p_t_i_o_n_s retrieves a sequence of bytes which when passed back to
the scanner driver via a subsequent call to _S_C_S_e_t_S_a_v_e_O_p_t_i_o_n_s restores the
scanner specific settings for _s to what the were at the time that
_S_C_G_e_t_S_a_v_e_O_p_t_i_o_n_s was called.
For both functions, _s is a SSSSCCCCAAAANNNNNNNNEEEERRRR pointer returned by a call to
_S_C_O_p_e_n(3), _S_C_O_p_e_n_F_i_l_e(3), or _S_C_O_p_e_n_S_c_r_e_e_n(3).
After _S_C_G_e_t_S_a_v_e_O_p_t_i_o_n_s returns successfully, *_o_p_t_i_o_n_s will point to
*_n_B_y_t_e_s bytes worth of scanner specific options settings. The layout of
this memory is completely at the discretion of the scanner driver and
should not be interpreted in any way by the scanner application. The
only thing the application should do with this memory is save it to a
permanent location for later restoration. The memory pointed to by
*_o_p_t_i_o_n_s is owned by _l_i_b_s_c_a_n(3) and should not be modified or freed, and
should not be expected to maintain its contents across subsequent calls
to _S_C_G_e_t_S_a_v_e_O_p_t_i_o_n_s.
For _S_C_S_e_t_S_a_v_e_O_p_t_i_o_n_s, _o_p_t_i_o_n_s is a pointer to _n_B_y_t_e_s of memory which will
be transmitted to the scanner driver as scanner specific options
settings. The only valid way for a scanner application to have obtained
data for passing to _S_C_S_e_t_S_a_v_e_O_p_t_i_o_n_s is to have previously called
_S_C_G_e_t_S_a_v_e_O_p_t_i_o_n_s and saved the results.
RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
_S_C_G_e_t_S_a_v_e_O_p_t_i_o_n_s and _S_C_S_e_t_S_a_v_e_O_p_t_i_o_n_s return 0 if successful, and -1 if
an error occurs. In the event of an error, _S_C_e_r_r_n_o will be set to
indicate the cause of the error.
EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
SCENOSAVEOPT No scanner specific savable options
PPPPaaaaggggeeee 1111
SSSSCCCCGGGGEEEETTTTSSSSAAAAVVVVEEEEOOOOPPPPTTTTIIIIOOOONNNNSSSS((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo SSSSCCCCGGGGEEEETTTTSSSSAAAAVVVVEEEEOOOOPPPPTTTTIIIIOOOONNNNSSSS((((3333))))
SCENOMEM Out of memory
SCECOMM Error communicating with scanner driver
WWWWAAAARRRRNNNNIIIINNNNGGGG
The pointer obtained by calling _S_C_G_e_t_S_a_v_e_O_p_t_i_o_n_s points to memory owned
by _l_i_b_s_c_a_n(3). The calling program should not modify the memory pointed
to by the return value of _S_C_G_e_t_S_a_v_e_O_p_t_i_o_n_s, nor should any assumptions be
made about its value after subsequent calls to _S_C_G_e_t_S_a_v_e_O_p_t_i_o_n_s. Any
needed information should be copied into program memory before calling
_S_C_G_e_t_S_a_v_e_O_p_t_i_o_n_s again.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
_l_i_b_s_c_a_n(3).
PPPPaaaaggggeeee 2222